//
//  LTQBaseTableViewController.swift
//  WeiBoProject
//
//  Created by MAC on 16/2/25.
//  Copyright © 2016年 LTQ. All rights reserved.
//

import UIKit

class LTQBaseTableViewController: UITableViewController, LTQVistorDelegate{
    
//    定义一个属性，子类可以进行访问
    var vistor :LTQVistorView?
    
    var isLogin: Bool = LTQUserViewModel.shareInstance.isLogin!
    
    override func loadView() {
        
        if  LTQUserViewModel.shareInstance.isLogin == true {
            
            super.loadView()
  
        }else{
            loadVistorView()
        }
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
    }

    func loadVistorView(){
        
        vistor = LTQVistorView()
        
        vistor?.delegate = self
        
        view = vistor
        
        
    }

    func didRegister() {
    
        let login = LTQLoginViewController()
        
        let nav = UINavigationController(rootViewController: login)
        
        presentViewController(nav, animated: true) { () -> Void in
            
        }
        
    }
    func didLogin() {
        print("didLogin")
    }
    
      
}
